/**
 * Created with IntelliJ IDEA.
 * User: teddy zhang
 * Date: 2015-04-07
 * Time: 17:24
 */

define(function (require, exports, module) {
	'use strict';
    
    var rk = require('rk');
    
    var rescenter = require('./global/rescenterGlobal');

    $.widget('rk.rescenterBaseCtrl', $.rk.oaPanelCtrl, {
        _create: function () {
            var me = this;
            var elem = me.element;
            var opt = this.options;


        },

        _init: function () {
            var me = this;
            var elem = me.element;

        },


        _setGlobal:function (tag,directoryId) {
            var me = this;
            if(window.SESSION.depart.specialType == 0){
                me.getPanel().data('current-group',rescenter.group[tag] || rescenter.group['com']);
            }else{
                me.getPanel().data('current-group',rescenter.group[tag] || rescenter.group['dep']);
            }
            me.getPanel().data('current-directoryId',directoryId || rescenter.directoryId);
            },

        _getPanelHeaderTitle: function (){
            var me = this;
          return me.getPanelHeader().find('span.rescenter-title');
        },

        _getToolbarContainer: function () {
            var me = this;
            return me.getPanel().find('.rescenter-title-toolbar');
        },

        _getTabHeaderContainer: function() {
            var me = this;
            return  me.getPanelContent().find('.oa-tab-header');
        },



        _getListFooterContainer: function (){
            var me = this;
            return me.getPanel().find('.oa-listview-footer');
        },


        _getNavContainer: function () {
            var me = this;
            return me.getPanel().find('.oa-rescenter-file-path');
        },

        _getListPanelContainer: function (){
            var me = this;
            return this.getPanel().find('.oa-accordion-content');
        },



        _getListContainer: function () {
            var me = this;
            return me.getPanel().find('.oa-rescenter-list');
        },


        _getSearchContainer: function () {
            var me = this;
            return me.getPanelContent().find('div.announce-search-box');
        },

        _getGroup: function () {
            var me = this;
            return me.getPanel().data('current-group');
        },

        _getDirectoryId: function () {
            var me = this;
            return me.getPanel().data('current-directoryId');
        }



    });

    return $;

});
